<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

  <xi:include href="master.html" />

<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
  <title>Pa&iacute;s: </title>
  
	<script type="text/javascript">
		function getID(id,formAction)
		{
			var element = document.getElementById(id+formAction);
			element.value = id;
		}
	</script>
</head>

<body>
	<div class="main_content">
	<h2>Pa&iacute;ses:</h2>
	
		<table py:if="paisCollection!=[]">
		  <tr>
		  		<td><b>Codigo:</b></td>
		  		<td><b>Descricao:</b></td>
		  		<td><b>Codigo Auxiliar:</b></td>
		  		<td><b>Valor:</b></td>
		  		<td></td>
		  </tr>
		  <tr py:for="pais in paisCollection">
		  		<td><span py:replace="pais.codigo">codigo</span></td>
		  		<td><span py:replace="pais.descricao">descricao</span></td>
		  		<td><span py:replace="pais.codigoAuxiliar">codigoAuxiliar</span></td>
		  		<td><span py:replace="pais.valor">valor</span></td>
		  		<td>
		  			<form action="/do_deletepais" method="post">
		  			  <input type="hidden" id="${pais.id}exclude" name="id"/>
		  			  <input type="submit" name="submit" value="Excluir" onclick="getID(${pais.id},'exclude')"/>
		  			</form>
		  		</td>
		  		<td>
		  			<form action="/updatepais" method="post">
		  			  <input type="hidden" id="${pais.id}delete" name="id"/>
		  			  <input type="submit" name="submit" value="Alterar" onclick="getID(${pais.id},'delete')"/>
		  			</form>
		  		</td>
		  		<td>
		  			<form action="/do_detail" method="post">
		  			  <input type="hidden" id="${pais.id}detail" name="id"/>
		  			  <input type="submit" name="submit" value="Detalhar" onclick="getID(${pais.id},'detail')"/>
		  			</form>
		  		</td>
		  </tr>
		</table>
		<p py:if="paisCollection==[]">Nenhum resultado encontrado.</p>
		
	</div>

</body>
</html>